OTCreateSystemTask
Allows a function to be executed at the next system task time.C INTERFACE
long OTCreateSystemTask (OTProcessProcPtr proc, void* arg)C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
proc
- A pointer to the process callback function you want executed at system task time.
arg
- A pointer to application-defined data that Open Transport can pass to your callback function. Pass
NULL
if you do not want this data passed. If you are creating more than one of the same kind of task, you can use different values forarg
to distinguish between the tasks.DESCRIPTION
TheOTCreateSystemTask
function creates a system task that you can schedule for execution at the next system task time. The task contains a pointer to the process callback function specified by theproc
parameter. At the next system task time, Open Transport calls your process callback function, passing it thearg
parameter and, for the 68000-family of Macintosh computers only, restoring the A5 global world to what it was when you originally calledOTCreateSystemTask
.This function returns a reference that you can use to identify a task in other system task functions. If the return value is 0, then there is not enough memory to allocate the necessary data.
SEE ALSO
To schedule a task for execution at system task time, call theOTScheduleSystemTask
function (page 7-10).To destroy a system task created with the
OTCreateSystemTask
function, call theOTDestroySystemTask
function (page 7-13).To cancel a task scheduled for execution at system task time, call the
OTCancelSystemTask
function (page 7-12).